package com.galina.notebook.dao.implementation;

import java.util.List;

import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;

import com.galina.notebook.dao.GenericDaoImpl;
import com.galina.notebook.dao.api.AccountDaoRemote;
import com.galina.notebook.persistence.Account;

@Stateless
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class AccountDao extends GenericDaoImpl<Account> implements AccountDaoRemote {

	@SuppressWarnings("unchecked")
	public List<Account> findAccountsByName(String name) {
		return executeQuery("Select u from Account u where u.name='" + name + "'");
	}

}
